﻿<phone:PhoneApplicationPage xmlns:my="clr-namespace:LiveEduWizard.Views"  
    x:Class="LiveEduWizard.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800" 
    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <!--LayoutRoot is the root grid where all page content is placed-->

    
    <Grid x:Name="LayoutRoot">
        <toolkit:ContextMenuService.ContextMenu>
            <toolkit:ContextMenu>
                <toolkit:MenuItem Header="reload" Click="ContextMenuItem_Click" Foreground="Black"/>
            </toolkit:ContextMenu>
        </toolkit:ContextMenuService.ContextMenu>
        
        <Image x:Name="MainBackground" Stretch="UniformTofill"/>
        
        <!--Panorama control-->
        <controls:Panorama x:Name="Panorama"  Title="Live Student Wizard" HorizontalAlignment="Left" Width="480" Background="Transparent">

            <controls:Panorama.TitleTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" FontSize="130" Opacity="0.75" Margin="0,69,0,0">
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="{Binding Source={StaticResource ThemeHelper}, Path=AccentColor}"/>
                        </TextBlock.Foreground>
                    </TextBlock>
                </DataTemplate>
            </controls:Panorama.TitleTemplate>

            <my:AgendaView x:Name="Agenda"/>

            <my:TimetableView DayOfWeek="Monday" Timetable="{Binding ActiveTimetable}" VerticalOffset="{Binding TimetableVerticalOffset, Mode=TwoWay}" Filter="{Binding FilterRule}"/>

            <my:TimetableView DayOfWeek="Tuesday" Timetable="{Binding ActiveTimetable}" VerticalOffset="{Binding TimetableVerticalOffset, Mode=TwoWay}" Filter="{Binding FilterRule}"/>

            <my:TimetableView DayOfWeek="Wednesday" Timetable="{Binding ActiveTimetable}" VerticalOffset="{Binding TimetableVerticalOffset, Mode=TwoWay}" Filter="{Binding FilterRule}"/>

            <my:TimetableView DayOfWeek="Thursday" Timetable="{Binding ActiveTimetable}" VerticalOffset="{Binding TimetableVerticalOffset, Mode=TwoWay}" Filter="{Binding FilterRule}"/>

            <my:TimetableView DayOfWeek="Friday"  Timetable="{Binding ActiveTimetable}" VerticalOffset="{Binding TimetableVerticalOffset, Mode=TwoWay}" Filter="{Binding FilterRule}"/>
        </controls:Panorama>
    
    </Grid>

</phone:PhoneApplicationPage>
